// 入口文件
import * as Vue from "vue";
import Vue2 from "vue2";

import App from "./App.vue";
import router from "./router";

import { useI18n } from "@xiaoe/ei18n/i18n";
import zh from "@xiaoe/live-room-components/lib/locales/zh/index.json";

window.Vue = window.Vue2 = Vue2 as any;
window.Vue3 = Vue;

const app = Vue.createApp(App);

var script = document.createElement("script");
script.type = "text/javascript";
script.src = window.__cdn_url_prefix
  ? `${window.__cdn_url_prefix}/fontSizeScript.js`
  : "../fontSizeScript.js";
document.head.appendChild(script);

useI18n(app, zh).then(() => {
  app.use(router).mount("#app");
});
